let mobile = document.documentElement.clientWidth < 750;
const u = navigator.userAgent;
const ios = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
function fontSize() {
    const deviceWidth = document.documentElement.clientWidth;
    // 判断PC或IOS
    const p50x = 1920 / 50;
    const p58x = 1920 / 58;
    const dividend = ios ? p58x : p50x;
    let size = deviceWidth / dividend;
    document.documentElement.style.fontSize = size + "px";
    mobile = document.documentElement.clientWidth < 750;
}
fontSize();
window.addEventListener("resize", fontSize);